package structure_pattern.Decorator_pattern;

import javax.lang.model.element.VariableElement;

/**
 * @author fly
 * @since 2022/8/22 16:42
 */
public class DecoratorTest {
    public static void main(String[] args) {
        Car car = new HighCar();
        Car carDecorator = new EngineCarDecorator(car);
        carDecorator.carType();
        // 第二次装饰
//        CarDecorator seatCarDecorator = new SeatCarDecorator(carDecorator);
//        seatCarDecorator.carType();

        // 半透明装饰模式
//        Car carNo = new HighCar();
//        EngineCarDecorator engineCarDecorator = new EngineCarDecorator(carNo);
//        engineCarDecorator.carType();
//        engineCarDecorator.replace();
    }
}